package com.salton123.soulove.sailfish.video.ui.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter

class VideoCategotyAdapter(
    fm: FragmentManager,
    private val dataList: MutableList<Pair<String, Fragment>>
) : FragmentStatePagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
    override fun getItem(position: Int): Fragment {
        return dataList[position].second
    }

    override fun getCount(): Int {
        return dataList.size
    }

    override fun getPageTitle(position: Int): CharSequence? {
        return dataList[position].first
    }
}